package main

import "fmt"

type Rect struct {
	width  float64
	height float64
}

func double_area(rect *Rect) {
	rect.width *= 2
	rect.height *= 2
	return
}

func (rect *Rect) area() float64 {
	return rect.width * rect.height
}

func main() {
	//var rect Rect

	//rect.width = 200
	//rect.height = 200

	//fmt.Println(rect.width * rect.height)

	//var rect = Rect{width: 200, height: 200}
	//var rect = Rect{100, 200}
	var rect = new(Rect)
	rect.width = 100
	rect.height = 200

	double_area(rect)
	fmt.Println(rect.width, "*", rect.height, "=", rect.area())
}
